<template>
  <div class="place-list-container">
    <sl-gutter/>
    <car-search-address placeholder="请输入上车/下车"/>
    <all-city-list/>
    <remote-address-list/>
    <historyAddressList/>
  </div>
</template>
<script>
import { mapState, mapMutations } from 'vuex'
import carSearchAddress from './modules/car-search-address/car-search-address'
import allCityList from './modules/car-select-result/all-city-list'
import remoteAddressList from './modules/car-select-result/remote-address-list'
import historyAddressList from './modules/car-select-result/history-address-list'
export default {
  components: { carSearchAddress, historyAddressList, remoteAddressList, allCityList },
  data () {
    return {

    }
  },
  computed: {
    ...mapState([
      'userCarState'
    ])
  },
  mounted () {
    let _selectedAddress = this.userCarState.callCarParams[this.$route.params.address];
    if (_selectedAddress.cityId) {
      this.SET_SHOW_TARGET_ADDRESS('isOpenHistoryAddress');
    } else {
      this.SET_SHOW_TARGET_ADDRESS('isOpenCityName');
    }
  },
  methods: {
    ...mapMutations([
      'SET_SHOW_TARGET_ADDRESS'
    ])
  }
}
</script>
<style lang="stylus" type="text/stylus" scoped>
</style>
